/*
 * @Author: hukai huzhengen@gmail.com
 * @Date: 2025-06-23 16:04:32
 * @LastEditors: hukai huzhengen@gmail.com
 * @LastEditTime: 2025-07-24 13:42:41
 * @FilePath: \新建文件夹 (8)\foodOrderingSystem-ui\src\api\ingredient.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import request from '@/utils/request'



// 查询
export function getList(data) {
    return request({
        url: '/food/ingredients/list',
        method: 'get',
        params: data
    })
}

// 获取用户详细信息
export function deleteIngredient(ingredientsIds) {
    return request({
        url: '/food/ingredients/' + ingredientsIds,
        method: 'DELETE'
    })
}

export function getListDai(data) {
    return request({
        url: '/food/ingredients/treat/list',
        method: 'get',
        params: data
    })
}

// 修改
export function ingredientUpdate(data) {
    return request({
        url: '/food/ingredients',
        method: 'put',
        data: data
    })
}

// 新增
export function ingredientAdd(data) {
    return request({
        url: 'food/ingredients',
        method: 'post',
        data: data
    })
}